<?php
//connection à la BDD
// Si la connection est impossible un message d'erreur est affiché
try
{ 
  $database_db="projet";
  $user_db="root";
  $password_db="";
  $host_db="localhost";
  $req = mysql_connect($host_db,$user_db,$password_db);
  mysql_select_db($database_db, $req)  or exit('Erreur BDD '.mysql_error());
  if ($req === false)
  {
    	throw new Exception('Cannot connect do mysql');
  }
  }
  catch (Exception $e)
  {
  echo "This page cannot be displayed";
	}

?>

